package com.ujiuye;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableConfigurationProperties
@ConfigurationPropertiesScan
@ServletComponentScan
@EnableTransactionManagement//开启事务注解
public class IqiyiApplication {

    public static void main(String[] args) {
        SpringApplication.run(IqiyiApplication.class, args);
    }

//    @Bean
//    public Docket docket(){
//        return new Docket(DocumentationType.SWAGGER_2)
//                .apiInfo(apiInfo())
//                .select()
//                .apis(RequestHandlerSelectors.basePackage("com.ujiuye" +
//                        ".controller"))
//                .paths(PathSelectors.any())
//                .build();
//    }
//
//    public ApiInfo apiInfo(){
//        return new ApiInfoBuilder()
//                .title("利用swagger2构建的API文档")
//                .description("用restful风格写接口")
//                .termsOfServiceUrl("")
//                .version("1.0")
//                .build();
//    }
//

}
